package com.loop.nettyrpc.provider;

import com.loop.nettyrpc.service.HelloService;

/**
 * @author zhangxiaolu
 * @since 2023-09-24 21:05
 */
public class HelloServiceImpl implements HelloService {

    // 当有消费方调用该方法时，返回一个结果
    @Override
    public String hello(String msg) {
        System.out.println("收到客户端消息msg=" + msg);
        if (msg == null) {
            return "你好客户端，我已收到你的消息";
        } else {
            return "你好客户端，我已收到你的消息[" + msg + "]";
        }
    }
}
